<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.workplan.vo.WorkPlanMain"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Map map=(Map)request.getAttribute("rightmap");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>粮油集团办公自动化协作平台</title>
    <script type='text/javascript' src='<%=basePath%>dwr/interface/TjsUserBo.js'></script>
	<script type='text/javascript' src="<%=basePath%>dwr/engine.js"></script>
	<script type='text/javascript' src="<%=basePath%>dwr/util.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/system/time.js"></script>
    <script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
<%
	String important ="无";
	String important1 ="无";
	String importA ="查看更多";
	if(request.getAttribute("important") !=null)
	{
		important = (String)request.getAttribute("important");
		if("".equals(important)){
			important="无";
			importA="";
		}
		important1 = important;
	}
	
	if(important.length()>45)important=important.substring(0,45);
 %>
 	<script type="text/javascript">
 		function today()
 		{
 			var list = document.getElementById('today');
 			list.className = 'over';
 			var list2 = document.getElementById('tomorrow');
 			list2.className = '';
 	
 			var todaydiv = document.getElementById('todayplan').style.display = "block" ;
 			var tomorrowdiv = document.getElementById('tomorrowplan').style.display = "none" ;
 		
 		}
 		function tomorrow()
 		{
 			var list = document.getElementById('tomorrow');
 			list.className='over';
 			var list2 = document.getElementById('today');
 			list2.className = '';
 		
 			var todaydiv = document.getElementById('todayplan').style.display = "none" ;
 			var tomorrowdiv = document.getElementById('tomorrowplan').style.display = "block" ;
 			
 		}
 		
 		function nowuser()
 		{
 			getNowUser();
 		
 			var list2 = document.getElementById('tomorrow');
 			list2.className = '';
 			var list3 = document.getElementById('today');
 			list3.className = '';
 			var todaydiv = document.getElementById('todayplan').style.display = "none" ;
 			var tomorrowdiv = document.getElementById('tomorrowplan').style.display = "none" ;
 			
 		}
 		
 		function getNowUser(){
	var div1 = document.getElementById('zxyhplan');
	var nowuser = '<ul style="margin-top:5px; margin-left:10px">';
	TjsUserBo.getNowUser({
		callback:function(str) {
			for(var j=0;j<str.length;j++){
				nowuser += '<li><a style="float: left;width: 100px;text-decoration:none;color:#0E3451; background:url(<%=basePath %>images/icon101.gif) no-repeat 0 0; padding-left:18px">'+str[j]+'</a></li>';
			}
			div1.innerHTML = nowuser+'</ul>';
		}
	});
	window.setTimeout('getNowUser()',10000);
}
	</script>

  </head>
  
  <body>
   <div id="gjl">
      <div id="indextit"><img src="<%=basePath%>images/gjlicon.jpg" /></div>
      <div id="index_wnl">
       <div class="wnl">
	      <table width="100%" border="0" cellspacing="0" cellpadding="0" height="86">
                  <tr>
                    <td align="center" width="28%"><a href="<%=basePath %>media/datetime.html" target="_black"><img src="<%=basePath%>images/wnl04.jpg" /></a></td>
                    <td align="center" width="72%" id="time"><script language="JavaScript" type="text/javascript">ShowTime();</script></td>
                  </tr>
          </table>
       </div>
       <div class="wnl">
	      <table width="100%" border="0" cellspacing="0" cellpadding="0" height="86">
                  <tr>
                  <td align="center" width="28%"><img src="<%=basePath%>images/weather_pic.gif" /></td>
                    <td align="left" width="72%">
	                    	<iframe src="http://weather.369.com/weather.html" name="weatherwin"
							width="120" marginwidth="20" height="37" marginheight="0"
							scrolling="no" frameborder="no" id="weatherwin" border="0"></iframe>
					</td>
                  </tr>
          </table>
       </div>
      </div>
      <div id="gzjhjm">
           <ul>
           	  <%
           		GregorianCalendar   ca   =   new   GregorianCalendar();
           	  	if(ca.get(GregorianCalendar.AM_PM) == 0)
           	  	{
           	  %>
           	  <li class="over" id="today"><a href="javascript:today()"><span>今日工作</span></a></li>
              <li id="tomorrow"><a href="javascript:tomorrow()"><span>明日计划</span></a></li>
            
           	  <% 			
           	  	}
           	  	else
           	  	{
           	  %>
           	  <li  id="today"><a href="javascript:today()"><span>今日工作</span></a></li>
              <li  class="over" id="tomorrow"><a href="javascript:tomorrow()"><span>明日计划</span></a></li>	
              
           	  <% 		
           	  	}
           	  %>	
           </ul>
      <br/>
      <br/>
      <%
      		if(map.get("今日工作") != null)
      		{
      			WorkPlanMain workPlanMain = (WorkPlanMain)map.get("今日工作"); 
      			if(ca.get(GregorianCalendar.AM_PM) == 0)
           	  	{
      				
      %>
      		<a id="todayplan" href="<%=basePath%>tjsinfo/tjsoa/workplan/selectWorkPlan.do?id=<%=workPlanMain.getId() %>">今天有工作</a>
      <%		
           	  	}
      			else
      			{
      %>
      		<a id="todayplan"  style="display:  none" href="<%=basePath%>tjsinfo/tjsoa/workplan/selectWorkPlan.do?id=<%=workPlanMain.getId() %>">今天有工作</a>
      <% 				
      			}
      		}
      		else 
      		{
      %>
      		<span id="todayplan">
      		</span>
      <% 			
      		}
      %>     
      <%
      		if(map.get("明日工作") != null)
      		{
      			WorkPlanMain workPlanMain2 = (WorkPlanMain)map.get("明日工作"); 
      			if(ca.get(GregorianCalendar.AM_PM) == 0)
           	  	{
      				
      %>
      			<a id="tomorrowplan" style="display: none" href="<%=basePath%>tjsinfo/tjsoa/workplan/selectWorkPlan.do?id=<%=workPlanMain2.getId() %>">明天有工作</a>
      <% 
      			}
      			else
      			{	
      %>
      			<a id="tomorrowplan" href="<%=basePath%>tjsinfo/tjsoa/workplan/selectWorkPlan.do?id=<%=workPlanMain2.getId() %>">明天有工作</a>
      <% 				
      			}		
      		}
      		else
      		{
      %>
      		<span id="tomorrowplan" ></span>
      <% 			
      		}
      %>
      <div class="zytx">
      	<div class="nr"><a title="<%=important1 %>"><%=important %></a>&nbsp;&nbsp;<a href="<%=basePath %>tjsinfo/tjsoa/messageImportant/loginReceiveMain.do" style="color: red"><%=importA %></a></div>
      </div>
      </div>
   </div>
  </body>
</html>
